package day2;

/**
 * @author oldliu
 * @since 1.0
 */
public class StrTest7 {
    public static void main(String[] args) {
        String s="java";
        s=s.concat("c++");//拼接
        System.out.println(s);
        s.contains("");
        //StringBuffer StringBuilder
        StringBuffer sb=new StringBuffer();
        sb.append("java");
        sb.append("c++");
        sb.insert(2,3.14);
        System.out.println(sb);
        sb.replace(4,6,"idea2018");
        System.out.println(sb);
        sb.reverse();//颠倒
        System.out.println(sb);
        System.out.println(">>>>>>>>>>>>>>");
        sb.append("javaio").append("javabasic").delete(3,7);
        System.out.print(sb);
    }
}
